<div id="out" class="index-out container">
    <div class="quick">
        <h3><i></i><strong><em>一周快转</em></strong></h3>
        <div id="week" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#week" data-slide-to="0" class="active"></li>
                <li data-target="#week" data-slide-to="1"></li>
            </ol>
            {{ if adsenses }}
            <!-- Wrapper for slides -->
            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <div class="carousel-caption">
                        <div class="list row">
                            <div class="list" style="padding-top:0;">
                                {{each adsenses.HomeWeek item index}}
                                {{ if index < 6 }}
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                    <a href="/{{ site.subDomain }}/detail/{{item._id.toString()}}" class="item-store media">
                                        <div class="media-body">
                                            <h4 class="media-heading">{{item.title}}</h4>
                                            <p>
                                                <strong>[出租]</strong>
                                                <span>{{item.estate.district}} {{item.estate.shopArea}}</span>
                                                <span>{{item.estate.type}}</span>
                                            </p>
                                            <p>
                                                <span><strong>{{item.estate.area}}</strong>m<sup name="">2</sup></span>
                                                <span><strong>{{item.estate.rental}}</strong>元/月</span>
                                            </p>
                                        </div>
                                    </a>
                                </div>
                                {{ /if }}
                                {{/each}}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="item">
                    <div class="carousel-caption">
                        <div class="list row">
                            <div class="list" style="padding-top:0;">
                                {{each adsenses.HomeWeek item index}}
                                {{ if index >= 6}}
                                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                                    <a href="/{{ site.subDomain }}/detail/{{item._id.toString()}}" class="item-store media">
                                        <div class="media-body">
                                            <h4 class="media-heading">{{item.title}}</h4>
                                            <p>
                                                <strong>[出租]</strong>
                                                <span>{{item.estate.district}} {{item.estate.shopArea}}</span>
                                                <span>{{item.estate.type}}</span>
                                            </p>
                                            <p>
                                                <span><strong>{{item.estate.area}}</strong>m<sup name="">2</sup></span>
                                                <span><strong>{{item.estate.rental}}</strong>元/月</span>
                                            </p>
                                        </div>
                                    </a>
                                </div>
                                {{ /if }}
                                {{/each}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {{ /if }}

        </div>
    </div>
    <div class="ok">
        <h3>最新成交</h3>
        <div id="deal" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#deal" data-slide-to="0" class="active"></li>
                <li data-target="#deal" data-slide-to="1"></li>
            </ol>
            {{ if traded }}
            <!-- Wrapper for slides -->
            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <div class="carousel-caption">
                        <div class="list">
                            <ul>
                                {{ if traded.pageDatas.length > 0 }}
                                {{ each traded.pageDatas data index }}
                                {{ if index < 8 }}
                                <li>
                                    <a href="/{{ site.subDomain }}/detail/{{data._id.toString()}}">
                                        <!-- <strong>{{ data.contact.name }}
                                        {{ if data.contact.male == 'male' }}
                                        先生
                                        {{ else }}
                                        女士
                                        {{ /if }}
                                        </strong>
                                        <small>已转让</small> -->
                                        <strong>{{ data.title.substring(0,9) + '...' }}</strong>
                                        <span class="time">{{ data.tradedAt | dateFormat }}</span>
                                    </a>
                                </li>
                                {{ /if }}
                                {{ /each }}
                                {{ /if }}
                            </ul>
                        </div>
                    </div>
                </div>
                {{ if  traded.pageDatas.length > 8 }}
                <div class="item">
                    <div class="carousel-caption">
                        <div class="list">
                            <ul>
                                {{ each traded.pageDatas data index }}
                                {{ if index >= 8 }}
                                <li>
                                    <a href="/{{ site.subDomain }}/detail/{{data._id.toString()}}">
                                        <!-- <strong>{{ data.contact.name }}
                                        {{ if data.contact.male == 'male' }}
                                        先生
                                        {{ else }}
                                        女士
                                        {{ /if }}
                                        </strong>
                                        <small>已转让</small> -->
                                        <strong>{{ data.title.substring(0,9) + '...' }}</strong>
                                        <span class="time">{{ data.tradedAt | dateFormat }}</span> 
                                    </a>
                                </li>
                                {{ /if }}
                                {{ /each }}
                            </ul>
                        </div>
                    </div>
                </div>
                {{ /if }}
            </div>
            {{ /if }}

        </div>
    </div>
</div>
